package com.yyy.dm.provider.controller;

import com.yyy.dm.provider.service.SchedulerSeatProviderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class SchedulerSeatProviderController {

    @Resource
    private SchedulerSeatProviderService schedulerSeatProviderService;

    @PostMapping("/updateSchedulerSeat")
    public Integer updateSchedulerSeat(@RequestBody Map map){
        return schedulerSeatProviderService.updateSchedulerSeat(map);
    }

    @PostMapping("/findSchedulerSeatStatusByScheduleIdAndXY")
    public Integer findSchedulerSeatStatusByScheduleIdAndXY(@RequestBody Map map){
        return schedulerSeatProviderService.findSchedulerSeatStatusByScheduleIdAndXY(map);
    }

    @PostMapping("/rollbackSchedulerSeat")
    public Integer rollbackSchedulerSeat(@RequestBody String orderNo){
        System.out.println(orderNo);
        return schedulerSeatProviderService.rollbackSchedulerSeat(orderNo);
    }

    @PostMapping("/updateSchedulerSeatPay")
    public Integer updateSchedulerSeatPay(@RequestBody String orderNo){
        return schedulerSeatProviderService.updateSchedulerSeatPay(orderNo);
    }

}
